--- title: "Santa Barbara's nature-based 'Sense of Place', as told by twitter" author: Jamie Montgomery date: '2020-03-31' slug: santa-barbara-twitter categories: [] tags: [] ---
The aim of this project was to evaluate whether or not geotagged social media data can be useful in providing insight into a region’s “Sense of Place” using Santa Barbara as a case study.
Sense of Place can be defined as the connection people feel to their geographic surroundings, including both the natural and built environment. Locations with a strong sense of place often have a strong identity felt by both locals and visitors.
Not surprisingly, tourists and locals both tweet about nature. Tourists tweet about nature more (X%), but stick to the popular tourist sites in town including the wharf, waterfront, zoo, santa barbara bowl and more. Santa barbara locals are also found at these sites just not as in high a proportion. Natural areas that are further from the downtown
There is significant overlap in tourist and local patterns within the downtown area, indicating that tourists and locals alike share a fondness for the same areas and things.
The easy answer - I live here! Since I know the city and surrounding areas rather well, I could quickly look at spatial patterns and understand what exists at that location. The total number of tweets coming from Santa Barbara is also manageable compared to a much larger urban city.
Also, Santa Barbara is known for being a tourist town, and having beautiful natural and built landscapes (ok - I might be a bit biased here). Santa Barbara sits between the mountains and the ocean just 1.5 hours north of LA and has excellent recreation, dining, entertainment options. It’s no surprise that a lot of UCSB students end up sticking around after graduation, myself included 🙋♀️.
Going into this project, I thought that twitter data would be easily accessibly based on the number of different projects I had been seeing that used Twitter data and related R packages. But I quickly learned that this was not the case and Twitter only allows free public access to past 9 days of tweets. This was a problem since we wanted all tweets from January 1, 2015 - December 31, 2019.
Twitter data was obtained freely through an established partnership between UCSB Library and Crimson Hexagon. Before downloading, the data was queried to meet the following conditions:
Crimson Hexagon only allows 10,000 randomly selected tweets to be exported, manually, at a time in .xls format. Due to this restriction, data was manually downloaded for every 2 days in order to capture all tweets (😓). This took a significant amount of point and click time as you can imagine!
Once downloaded, the twitter data did not contain all desired information, including whether or not the tweet was geotagged which was vital to this project. To get this information I stepped outside of my R comfort zone and used the python twarc library. This library can be used to “rehydrate” twitter data using individual tweet ids, and then store all associated tweet information as .json files. From here I was able to remove all tweets that did not have a geotag, giving a total of 79,981 tweets.
Here is a sample of the tweet data:
| Month | Day | Time | Year | full_text | user_location | retweet_count | favorite_count | month_num | date |
|---|---|---|---|---|---|---|---|---|---|
| Jan | 5 | 06:12:01 | 2016 | Me goofing off for my brother filming with an 8mm camera (c.1981). #goleta #california #8mm… https://t.co/L3Zx61XFBg | Santa Barbara, CA, USA | 0 | 0 | 1 | 2016-01-05 |
| Feb | 14 | 03:16:57 | 2018 | Oh dear… not again!🙈🙈🙈 boss is addicted 😳😩😩 @ Montecito, California https://t.co/H61dt2HDbh | Camarillo, CA | 0 | 0 | 2 | 2018-02-14 |
| Jan | 18 | 04:50:04 | 2019 | This is the ballroom at the Santa Barbara Biltmore getting ready for a wedding reception. The ceilings were hung with flowers everywhere. It was amazing to see, what if you were allergic… https://t.co/UMltGJcWsZ | Seattle, WA | 0 | 1 | 1 | 2019-01-18 |
| Oct | 22 | 20:48:28 | 2017 | It begins with primer (@ Elmira Branch Mfg Workshop in Santa Barbara, CA) https://t.co/0DtVvfFACI | Santa Barbara, CA | 0 | 0 | 10 | 2017-10-22 |
| Jun | 16 | 18:10:36 | 2015 | Congrats to this bruin alum who worked incredibly hard these past four years! Love you. Try not to… https://t.co/p16nLgZ8pg | NA | 0 | 0 | 6 | 2015-06-16 |
| Jan | 27 | 16:19:14 | 2017 | My people will again live under my shade. They will flourish like grain and blossom like… https://t.co/sN9x1cir9U | Santa Barbara, CA | 0 | 1 | 1 | 2017-01-27 |
| Aug | 28 | 17:03:03 | 2018 | Mom, I got my shoes on for dinner to match my new dress! 👧🏼👢🤷🏼♀️ #ToddlerLife #ShoeFreak #LillianRose #FamilyVacation #BeachHouseLife #TheseBootsAreMadeForWalking #MomLife @ Padaro… https://t.co/H5MiRyYEsd | San Francisco,Ca | 0 | 0 | 8 | 2018-08-28 |
Almost immediately after plotting tweets over time you can see that the total number of geotagged tweets is going down over time. Most noticeably, there is a significant drop in tweets at the end of April, 2015. It seems this is due “a change in Twitter’s ‘post Tweet’ user-interface design results in fewer Tweets being geo-tagged” ( source). The first 4 months of 2015 have 15,720 tweets, or roughly 19% of all tweets. To reduce a skew in the data and remove geotagged tweets that may have been geotagged without knowledge by the user in those months, I moved forward with all tweets from May 1, 2015 through the end of 2019.

The spatial distribution of tweets highlights areas of higher population density and tourist areas in downtown Santa Barbara.
There is a single coordinate that has over 11,000 tweets reported across all years. It is near De La Vina between Islay and Valerio. There is nothing remarkable about this site so I assume it is the default coordinate when people tag “Santa Barbara” generally. The coordinate is 34.4258, -119.714.
As you zoom in on the map, clusters will disaggregate. You can click on blue points to see the tweet.
This project aimed to understand if and how preferences differ between tourists and locals for nature-based places within the Santa Barbara area. In order to test this I needed to come up with a way to identify tourists or locals. I ended up using a two step process:
This is not fool-proof and there are definitely instances where people visit and tweet from Santa Barbara more than two months a year, especially if they are visiting family or live within a couple hours driving distance, but without more data (and time) to determine where “tourists” truly live, this will have to do.
There are 21811 tweets from tourists and 45420 tweets from locals (32% and 68%). There are 12460 unique tourists and just 1893 unique local users.
